﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace MyWebApp.Areas.Sys.Models
{
    public class UserModel
    {
        public int Id { get; set; }
        [DisplayName("用户帐号")]
        [Required()]
        [StringLength(3)]
        public string UserId { get; set; }
        [DisplayName("姓名")]
        [Required]
        public string FullName { get; set; }
        [DisplayName("性别")]
        public string Sex { get; set; }
        [DisplayName("邮件")]
        [RegularExpression(@"[A-Za-z0-9._%+-]+@[A-Za-z0-9]+\.[A-Za-z]{2,4}", ErrorMessage = "请输入正确的邮件地址")]
        public string Mail { get; set; }
        [DisplayName("电话")]
        [Required]
        [RegularExpression("1[3|5|7|8|][0-9]{9}", ErrorMessage = "请输入正确的手机号码")]
        public string Phone { get; set; }
        [DisplayName("状态")]
        public short State { get; set; }
        [DisplayName("创建人")]
        public string CreateUser { get; set; }
        [DisplayName("创建时间")]
        public DateTime? CreateTime { get; set; }
    }
}